package pl.dalkia.services.scanner.services.matcher;

import java.util.regex.Matcher;

public class DateConditionLogMatcher extends AbstractConditionLogMatcher
		implements Matchable {

	public DateConditionLogMatcher(String datePattern) {
		super(datePattern);
	}

	@Override
	public boolean match(String input) {

		if (isReadyForMatching(input)) {
			return performMatch(input);
		}
		return false;
	}

	private boolean performMatch(String input) {
		Matcher matcher = super.pattern.matcher(input);
		return matcher.find();
	}
}
